package spindles.gwt.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;

public class Toolbar extends Composite{
	
	private Label title = new Label(); 
	
	private HorizontalPanel toolbar = new HorizontalPanel();
	
	public Toolbar(){
		this("");
	}
	
	public Toolbar(String text){
		title.setText(text);
		toolbar.add(title);
		toolbar.setStyleName("spindles-RightPanelTop");
		toolbar.setWidth("100%");
		
		initWidget(toolbar);
	}
	
	public void setTitle(String text){
		title.setText(text);
	}
	
	public void add(Widget w){
		toolbar.add(w);
	}
}
